﻿using Microsoft.AspNet.SignalR;
using NLog.Targets.SignalR;

namespace ACServerApi.Hubs
{
    /// <summary>
    /// SignalR Hub used by nlog for submitting log events to connected clients
    /// </summary>
    public class LoggingHub : Hub<ILoggingHub>
    {
        /// <summary>
        /// Send a LogEvent to all other connected clients
        /// </summary>
        /// <param name="logEvent">LogEvent to send</param>
        public void Log(LogEvent logEvent)
        {
            Clients.Others.Log(logEvent);
        }
    }
}